package com.bbs.core.service;

import java.util.List;

import com.bbs.core.model.User;

/**
 * Created by Administrator on 2017/8/16.
 */
public interface UserService {
	
	public static final int BBS_TOPIC_SCORE = 10;
	public static final int BBS_POST_SCORE = 3;
	public static final int BBS_REPLAY_SCORE = 3;
	
	
	//level 用户等级
	
	public static final int REFRESH_THRESHOLD = 30;
	public static final int OLD_THRESHOLD = 100;
	public static final int TEACHER_THRESHOLD = 200;
	public static final int DIRECTOR_THRESHOLD = 350;
	public static final int PRESIDENT_THRESHOLD = 700;
	
	
	public void addTopicScore(int userId);
	public void addPostScore(int userId);
	public void addReplayScore(int userId);

	/** 设置用户账号
	 * @param userName
	 * @param password
	 */
	public User setUserAccount(User user);
	
	public User getUserAccount(String userName,String password);
	
	public boolean hasUser(String userName);

    List<User> findUsersByPage(int pageNum, int pageSize);

	void saveUser(User user);
	User login(User user);
	User selectByPrimaryKey(Integer id);
	
}
